async function async1() {
    console.log('async1 start')//2
    await async2()
    console.log('async1 end')//9  async2 后面的输出 async1 end进入微任务，等待下一轮的事件循环 微任务队列3
}

async function async2() {
    console.log('async2')//3
}

console.log('script start')//1

setTimeout(function () {
    console.log('setTimeout0') //11 第一个 setTimeout，将回调函数放到 timer 队列中
}, 0)

setTimeout(function () {
    console.log('setTimeout2') //13 第二个 setTimeout，300ms后将里面的回调函数放到 timer 队列中
}, 300)

setImmediate(() => console.log('setImmediate'));//12   第一个setImmediate，将里面的回调函数放到 check 队列中

process.nextTick(() => console.log('nextTick1'));//7  遇到第一个 nextTick，将其里面的回调函数放到本轮同步任务执行完毕后执行

async1();

process.nextTick(() => console.log('nextTick2'));//8  遇到第二个，将其里面的回调函数放到本轮同步任务执行完毕后执行

new Promise(function (resolve) {
    console.log('promise1')//4
    resolve();
    console.log('promise2')//5
}).then(function () {
    console.log('promise3')//10  微任务队列4
})

console.log('script end')//6